package com.woniuxy.producer;

import com.woniuxy.util.RabbitmqConst;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @BelongsProject: pigTrotterStore
 * @BelongsPackage: com.woniuxy.producer
 * @Author: Quan
 * @Date: 2025/3/21 15:41
 */
@Component
public class TopicProducer {
	@Autowired
	private RabbitTemplate rabbitTemplate;

	public void send(String routeKey, String msg) {
		rabbitTemplate.convertAndSend(RabbitmqConst.TOPIC_EXCHANGE, routeKey, msg);
	}
}
